package cn.sciento.websocket.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "stong.websocket")
public class WebSocketConfig {
    static final String PREFIX = "stong.websocket";

    private String websocket = "/websocket";

    private String sockJs = "/sock-js";

    private String oauthUrl = "http://stong-oauth/api/user";

    private Integer redisDb = 1;

    private Integer oauthRedisDb = 3;

    private String heartbeat = "stong-hi";

    public String getWebsocket() {
        return this.websocket;
    }

    public WebSocketConfig setWebsocket(String websocket) {
        this.websocket = websocket;
        return this;
    }

    public String getSockJs() {
        return this.sockJs;
    }

    public WebSocketConfig setSockJs(String sockJs) {
        this.sockJs = sockJs;
        return this;
    }

    public String getOauthUrl() {
        return this.oauthUrl;
    }

    public WebSocketConfig setOauthUrl(String oauthUrl) {
        this.oauthUrl = oauthUrl;
        return this;
    }

    public Integer getRedisDb() {
        return this.redisDb;
    }

    public WebSocketConfig setRedisDb(Integer redisDb) {
        this.redisDb = redisDb;
        return this;
    }

    public String getHeartbeat() {
        return this.heartbeat;
    }

    public WebSocketConfig setHeartbeat(String heartbeat) {
        this.heartbeat = heartbeat;
        return this;
    }

    public Integer getOauthRedisDb() {
        return this.oauthRedisDb;
    }

    public void setOauthRedisDb(Integer oauthRedisDb) {
        this.oauthRedisDb = oauthRedisDb;
    }
}
